<?php 
global $language, $base_path;
$data = $items['data'];
$action_prefix = "/".$language->language . $base_path;
?>
<div class="top-page">
  <div class="home-search">
    <div class="search-bar">
      <form action="<?php print $action_prefix; ?>experiences/search/0" method="GET">
        <div class="row-wrap">
           <input class="search-bar-input" id="query" name="query" type="text" value=""> 
           <button class="btn btn-primary red-btn" type="Submit"><?php print t("Search");?></button>
        </div>
      </form>
    </div>
    <?php if(count($items['keywords']) > 0): ?>
    <div class="row">
        <div class="span12 city-links">
            <div class="city-experiences">
                <a href="<?php print $action_prefix; ?>experiences/search/0">
                    <?php echo t('Guided Experiences'); ?>:
                </a>
            </div>
            <?php foreach($items['keywords'] as $key => $item): ?>
            <a href="<?php echo $action_prefix ?>experiences/search/0?query=<?php echo $item->name; ?>">
                <?php echo $item->name; ?>
            </a>
            /
            <?php endforeach; ?>
            <div class="city-experiences">
                <a href="<?php print $action_prefix; ?>experiences/search/0">
                   <?php echo t('More'); ?>...
                </a>
            </div>
        </div>
    </div>
    <?php endif; ?>
  </div>
</div>

<div class="row home-prom-list">
  <?php foreach ($data as $key => $item): ?>
    <?php $img_url = image_style_url('large', $item->uri); ?>
    <div class="card3 card3-medium span4">

      <div class="card3-photo">
        <a href="<?php print $action_prefix . "experience/" . $item->nid; ?>">
        <div class="img" style="background: #242731 url('<?php print $img_url;?>') no-repeat center center;"></div>
        </a>
      </div>

      <div class="card3-details">
        <div class="card3-name"><a class="text-color" href="<?php print $action_prefix . "experience/" . $item->nid; ?>"><?php print $item->title; ?></a></div>  
        <div class="card3-user"><?php print t("with"); ?> <a href="<?php print $action_prefix . "profile/". $item->uid; ?>"><?php print $item->exp_name; ?></a></div> 
        <p class="card3-description"><a href="<?php print $action_prefix . "experience/" . $item->nid; ?>">
          <?php print strip_tags($item->detail); ?>
        </a></p>
      </div>

    </div>
  <?php endforeach; ?>
</div>
<?php if(count($data) > 0): ?>
<div class="text-center" style="margin-bottom: 40px;">
  <a class="btn btn-info btn-large" href="<?php print $action_prefix; ?>experiences/search/0">
    <?php print t("Load More");?>
  </a>
</div>
<?php endif;?>
